<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>watch监控对象，深度监控</title>
</head>
<body>
<div id="app">
    <input v-model="user.name"/>
</div>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let vue = new Vue({
            el: "#app",
            data: {
                user: {
                    id: 66,
                    age: 88,
                    name: "zxcv"
                }
            },
            watch: {
                user: {
                    deep: true,//深度监控，监控对象自身以及对象内部的属性的值
                    handler(sd) {
                        console.log(sd)
                    }
                }
            }

        })
    ;
</script>
</body>
</html>